﻿@using Nop.Core
@using Nop.Core.Infrastructure
@using Nop.Core.Infrastructure.DependencyManagement
@using Taoke.Core;
@{
    var storeLocation = EngineContext.Current.Resolve<Nop.Core.IWebHelper>().GetStoreLocation();
}
<!DOCTYPE html>
<html>
<head>
    <title>@Html.NopTitle(true)</title>
    <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    @*This is used so that themes can inject content into the header*@
    @Html.Partial("Head")
    @*custom css*@
    @Html.NopCssFiles(ResourceLocation.Head)
    
    @*do not handle links via ajax by default
    1. automatically update page URLs (for example, when adding a product to the cart
    2. process SSL redirections*@
    <script type="text/javascript">
          $(document).bind("mobileinit", function () {
              $.mobile.ajaxEnabled = false;
          });
        </script>
    <script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    <script src="http://l.tbcdn.cn/apps/top/x/sdk.js?appkey=@TOPHelper.AppKey"></script>
    <script type="text/javascript" src="@Url.Content("~/Scripts/jquery.mobile-1.0.1.min.js")"></script>
    @Html.NopScripts(ResourceLocation.Head)
    @Html.Action("WidgetsByZone", "Widget", new { widgetZone = Nop.Core.Domain.Cms.WidgetZone.MobileHeadHtmlTag })
    <!--Powered by nopCommerce - http://www.nopCommerce.com-->
    <!--Copyright (c) 2008-2012-->
</head>
<body>
    @Html.Action("WidgetsByZone", "Widget", new { widgetZone = Nop.Core.Domain.Cms.WidgetZone.MobileAfterBodyStartHtmlTag })
    <div data-role="page" data-theme="b">
        <div data-role="header" data-position="inline">
            @*do not use @Html.Partial("Header")
            use sections right here so they can be overriden in the views*@
            @if (IsSectionDefined("top-left-button"))
            {
                @RenderSection("top-left-button")
            }
            else
            {
                <a href="@Url.RouteUrl("HomePage")" data-icon="home">首页</a>
            }
            @*title*@
            @if (IsSectionDefined("title"))
            {
                 @RenderSection("title")
            }
            else
            {
                <h1>@Html.NopTitle(false)</h1>
            }
            @if (IsSectionDefined("top_right_button"))
            {
                @RenderSection("top_right_button")
            }
            else
            {
                @*<a href="#" data-rel="back" data-icon="back">Back</a>*@
                @Html.Action("ConfigButton", "Common")
            }
        </div>
        @if (IsSectionDefined("headerlinks"))
        {
            @RenderSection("headerlinks")
        }
        else
        {
            @*<div data-role="header" data-position="inline">
                @Html.Action("HeaderLinks", "Common")
            </div>*@
        }
        @if (IsSectionDefined("search"))
        {
            @RenderSection("search")
        }
        else
        {
            using (Html.BeginRouteForm("TaokeSearch", FormMethod.Get))
            {
                <div class="search-input">
                    <input type="search" name="Keyword" id="small-searchterms" value="搜 春季新款 试试" onfocus="this.select()"/>
                </div>
            }
        }
        
        @Html.Action("WidgetsByZone", "Widget", new { widgetZone = Nop.Core.Domain.Cms.WidgetZone.MobileBeforeContent })
        <div data-role="content">
            @Html.Partial("_Notifications")
            @RenderBody()
        </div>
        @Html.Action("WidgetsByZone", "Widget", new { widgetZone = Nop.Core.Domain.Cms.WidgetZone.MobileAfterContent })
        @if (IsSectionDefined("footer"))
        {
            @RenderSection("footer")
        }
        else
        {
            <div class="footer">
                @Html.Action("Footer", "Common")
            </div>
        }
    </div>
    @Html.Action("WidgetsByZone", "Widget", new { widgetZone = Nop.Core.Domain.Cms.WidgetZone.MobileBeforeBodyEndHtmlTag })
    @Html.NopCssFiles(ResourceLocation.Foot)
    @Html.NopScripts(ResourceLocation.Foot)
    
</body>
</html>
